TARGET=cover
CC=gcc
CFLAGS+= -Iinclude/ -ansi -Wall -Wextra -Wdeclaration-after-statement -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wno-unused-parameter -Werror -pedantic -g `pkg-config --cflags libcurl` `pkg-config --cflags glib-2.0` `xml2-config --cflags --libs` `pkg-config --libs libcurl` `pkg-config --libs glib-2.0`
SOURCES=$(shell echo src/*.c)
OBJECTS=$(SOURCES:.c=.o)

all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(CC) $^ -o $@ $(LDFLAGS)

clean:
	rm -f $(TARGET) $(OBJECTS) .depend *~

test: $(OBJECTS)
	make -C test test

.depend: *.[ch]
	$(CC) -MM $(SOURCES) >.depend

-include .depend

.PHONY: clean all

